package com.properties;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

public class Test {
    public static  void main(String args[]) {
        InputStream in1 = Test.class.getClassLoader().getResourceAsStream("test2.properties");
        Properties p = new Properties();
        try {
            p.load(in1);
            String name = p.getProperty("name");
            System.out.println(name);
        }
        catch (IOException e) {
            e.printStackTrace();
        }

    }
}
